<?php
include('include/config.inc.php');
if(!isset($_SESSION['s_activId'.$cfgPack])
   || (isset($_SESSION['s_userType'.$cfgPack]) && isset($cfgFileNames['item'][$_SESSION['s_userType'.$cfgPack]]) 
        && $cfgFileNames['item'][$_SESSION['s_userType'.$cfgPack]] == 0))
{
  $_SESSION['s_urlRedirectDir'] = $_SERVER['REQUEST_URI'];
  header("Location:checkLogin.php");
}
else
{	
  $query1 = "UPDATE item SET status = 'D'
              WHERE itemId = ".$_GET['itemId'];
  $result1= mysql_query($query1);
  if(!$result1)
  {
    echo "DELETING FAILED";
  }
  else
  {
    header("Location:item.php");
  }
}
?>	  